home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 7
/
Apprentice-Release7.iso
/
Environments
/
PowerFantasm™ 4.19a
/
PowerFantasm™
/
F4_EXAMPLES
/
PPC_Graphics_demo
/
graph_demo_init.s
next >
Wrap
Text File
|
1996-08-29
|
1KB
|
50 lines
*******************************
**Fantasm V4 PowerPC demo #1
**Opens two windows and runs various graphical tests
**
**File:graph_demo_init.s
**Date: 3rd Dec.95
**©Lightsoft 1995.
param1: reg r3 *Set up the names of the regs used for parameter passing
param2: reg r4
param3: reg r5
param4: reg r6
bss: reg r30 *The register we use for global data
graph_demo_init:
mflr r29 *save return address
bl open_window
mtlr r29
blr
open_window:
mflr r28
li `param1,128 *windows id is 128
li `param2,0 *clear param2 - storage
li `param3,-1 *behind
Xcall GetNewCWindow *Note NewCWindow, else we'd have problems with the colors.
stw `param1,window_1_ptr(`bss)
**get the viewable rectangle (top,left,bottom,right)
la r3,16(r3) *windoptr+16=viewrect
la r4,viewrect_1(`bss)
**copy rectangle
lfs f0,(r3) *64 bit move into f0
stfs f0,(r4) *64 bit store into viewrect_1 (cool or what!)
lfs f1,4(r3) *change from previous lfd which will cause crashes on 604's
stfs f1,4(r4)
**And copy to our second rectangle as well
la r4,viewrect_2(`bss)
stfs f0,(r4) *into viewrect_2
stfs f0,4(r4)
**set the port to our window
lwz `param1,window_1_ptr(`bss)
Xcall SetPort
lwz r10,white(rtoc)
mtlr r28
blr
****
global graph_demo_init
extern_data white